<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#"
    py:extends="'master.kid'">
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
<title>Admin - Index</title>
</head>
<body>
    <div class="actions">
        <a href="/admin/write">Write Post</a>
    </div>
    <div class="posts drafts" py:if="len(drafts) > 0">
        <h2>Draft Posts</h2>
        <table>
            <tr>
                <th>#</th>
                <th>Title</th>
                <th>Date</th>
                <th>&nbsp;</th>
            </tr>
            <tr py:for="post in drafts" id="post_${post.id}">
                <td py:content="post.id">0</td>
                <td py:content="post.title">Post title</td>
                <td py:content="post.post_date">01/01/01</td>
                <td><a href="/admin/edit?id=${post.id}">edit</a></td>
            </tr>
        </table>
    </div>
    <div class="posts published" py:if="len(published) > 0">
        <h2>Published Posts</h2>
        <table>
            <tr>
                <th>#</th>
                <th>Title</th>
                <th>Date</th>
                <th>&nbsp;</th>
            </tr>
            <tr py:for="post in published" id="post_${post.id}">
                <td py:content="post.id">0</td>
                <td py:content="post.title">Post title</td>
                <td py:content="post.post_date">01/01/01</td>
                <td><a href="/admin/edit?id=${post.id}">edit</a></td>
            </tr>
        </table>
    </div>

</body>
</html>